package com.jiazhong.cloud.governance.provider.controller;

import com.jiazhong.cloud.governance.provider.service.ProviderService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// http://localhost:8001/provider
@RestController
@RequestMapping("/provider")
public class ProviderController {
    @Resource
    private ProviderService providerService;


    @GetMapping
    public String hello() {
        return providerService.hello();
    }

    @GetMapping("/a/{name}")
    public String a(@PathVariable("name") String name) {
        return "ProviderController`a method!params:" + name;
    }
}
